package tt.dz.service.sys;

import java.util.List;
import java.util.Map;

import tt.dz.entity.base.JsonCommon;
import tt.dz.entity.base.JsonForList;
import tt.dz.entity.base.OmsCommonParam;
import tt.dz.entity.charger.OmsCharger;
import tt.dz.entity.charger.OmsChargerBespeakBillRecord;
import tt.dz.entity.charger.OmsChargerChargeBillRecord;
import tt.dz.entity.charger.OmsChargerNo;
import tt.dz.entity.charger.OmsChargerRate;
import tt.dz.entity.charger.OmsChargerStateAlternate;
import tt.dz.entity.charger.OmsChargerStateDirect;
import tt.dz.entity.station.OmsStation;
import tt.dz.vo.oms.ChargerCountAndInfoVO;
import tt.dz.vo.oms.ChargerExportVO;

public interface ChargerService {
//	public OmsCharger getChargerById(String charger_id,int port_no);
	public List<OmsCharger> getList(OmsCharger charger);
	public JsonCommon<OmsCharger> getLists(OmsCharger charger,String qr_code);
	public String getChargerList(OmsCharger charger);
	public JsonForList updateCharger(OmsCharger charger);
	public JsonForList updateChargerList(List<OmsCharger> chargerList);//针对多枪的桩
	public JsonForList deleteCharger(List<String> list,String oper_id, String chargerType)  throws Exception ;
	public JsonForList getChargerListByStation(OmsCharger charger);
	public JsonCommon getChargerDetail(String charger_id);
	public List<OmsCharger> findAll();
	public List<OmsCharger> getChargerByIds(String chargerIds);
//	public List<OmsCharger> getExportData(String charger_type, String online_status, String charge_status,
//			String province_code, String city_code, String district_code);
	public JsonForList getChargerListTest(OmsCharger charger);
	public String updateQrCode(String charger_id);
	public List<Map<String, Object>> findDataBySql(String sql , Object params);
	public List<OmsCharger> findExample(OmsCharger obj, Integer pageNo, Integer pageSize, String sortName,
			Integer sortVal);
	public OmsCharger findOneExample(OmsCharger obj, String order, String sortVal);
	public int save(OmsCharger obj);
	public OmsChargerStateAlternate findOneAlternate(OmsChargerStateAlternate obj, String order, String sortVal);
	public OmsChargerStateDirect findOneDirect(OmsChargerStateDirect obj, String order, String sortVal);
	int updateStateAlternate(OmsChargerStateAlternate obj);
	int updateStateDirect(OmsChargerStateDirect obj);
	public int update(OmsCharger omsCharger);
	/**
	 * 获取电站下的电桩的数量及简要信息
	 * @param stationId 电站id
	 */
	ChargerCountAndInfoVO getChargerCountAndInfo(String stationId);
	/**
	 * 获取某电站下充电桩状态信息(包括交流桩和直流桩)
	 * @param stationId 电站id
	 */
	List<OmsChargerStateDirect> getChargerStateInfo(String stationId);
	//按桩类型查询某种类型桩的全部数量、空闲、充电中、预约中、离线中数量
	public JsonCommon<OmsChargerNo> getChargerStatusNo(String charger_type,String ... params);
	//按桩类型、桩地址、桩状态查询桩详情···包括桩表信息、每个充电口状态
//	public JsonForList<Map<String, Object>> getChargerStatusList(String chargerId, String charge_status, String charger_type);	
	/********************20160325 perlin add begin***************************/
	//电口Id查询单个电口信息
	public JsonCommon getPortStateInfo(String chargerId, String port_no) throws Exception;
	//桩Id查询桩所有电口信息
	public <T> List<T> getPortsStateInfo(String chargerId);
	//获取电桩详细信息，包括站点名称  生产厂商名称、 城市名称
	public OmsCharger findChargerDetailByChargerId(String charger_id);
	//通过二维码获取电桩详细信息，包括站点名称  生产厂商名称、 城市名称
	public OmsCharger findChargerDetailByQrCode(String qr_code);
	//根据站Id查该站下的空闲桩数量(不包括电口在充电的)
	public Long getFreeChargerByStationId(String station_id,int type);
	/********************20160325 perlin add end***************************/
	public JsonForList<Map<String, Object>> getChargerStatusList(String chargerId, String charge_status, String charger_type, String stationId);
	public JsonForList<OmsCharger> getChargersWithOutStationByOperMerchantId(String oper_merchant_id);
	public JsonForList getChargersDetailByStationId(String station_id);
	public JsonForList<Map<String, Object>> getSimpleChargerList(String stationId, String charger_type,String chargerId);
	public OmsChargerBespeakBillRecord getChargerBespeakBill(String charger_id, Integer charger_port_no, String user_pay_card);
	public OmsChargerChargeBillRecord getChargerChargeBill(String charger_id, Integer charger_port_no, String user_pay_card);
	public JsonCommon getChargeInfoAndBespeakInfoByUserPayCard(String user_pay_card);
	public JsonCommon getBespeakDetailInfoByOrderNo(String order_no);
	public JsonCommon getChargeDetailInfoByOrderNo(String order_no);
	public JsonCommon getChargeStateForBigScreenByIds(String chargerIds);
	public List<OmsChargerRate> findChargerRateByChargerId(String charger_id);

	List<ChargerExportVO> getExportData(Integer chargerType,String[] list_chargerId);
	public JsonCommon getWeatherByCityId(String cityId);
	public JsonForList getChargerStatusByStationId(String stationId);
	public JsonForList<Map<String, Object>> getSimpleChargerPageList(OmsCommonParam buildQueryParam, String stationId,String charger_type, String chargerId,String chargerStatus, String searchStr);

	String getQrCode(String charger_id);
}
